package edu.nf.ssm.web;

import com.github.pagehelper.PageInfo;
import edu.nf.ssm.entity.City;
import edu.nf.ssm.service.CityService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wangl
 * @date 2025/5/16
 */
@RestController
public class CityController {

    private CityService cityService;

    public CityController(CityService cityService) {
        this.cityService = cityService;
    }

    @GetMapping("/list/city")
    public PageInfo<City> listCity(int pageNum, int pageSize) {
        return cityService.listCity(pageNum, pageSize);
    }
}